/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "con_nivelcuenta")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ConNivelCuenta.findAll", query = "SELECT s FROM ConNivelCuenta s"),
    @NamedQuery(name = "ConNivelCuenta.findByconCodigoNivCue", query = "SELECT s FROM ConNivelCuenta s WHERE s.conCodigoNivCue = :conCodigoNivCue"),
    @NamedQuery(name = "ConNivelCuenta.findByconNombreNivCue", query = "SELECT s FROM ConNivelCuenta s WHERE s.conNombreNivCue = :conNombreNivCue")})
public class ConNivelCuenta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CON_CODIGO_NIVCUE")
    private String conCodigoNivCue;
    @Size(max = 30)
    @Column(name = "CON_NOMBRE_NIVCUE")
    private String conNombreNivCue;
    
    
    public ConNivelCuenta() {
    }

    public ConNivelCuenta(String conCodigoNivCue) {
        this.conCodigoNivCue = conCodigoNivCue;
    }

    public String getConCodigoNivCue() {
        return conCodigoNivCue;
    }

    public void setConCodigoNivCue(String conCodigoNivCue) {
        this.conCodigoNivCue = conCodigoNivCue;
    }

    public String getConNombreNivCue() {
        return conNombreNivCue;
    }

    public void setConNombreNivCue(String conNombreNivCue) {
        this.conNombreNivCue = conNombreNivCue;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (conCodigoNivCue != null ? conCodigoNivCue.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ConNivelCuenta)) {
            return false;
        }
        ConNivelCuenta other = (ConNivelCuenta) object;
        if ((this.conCodigoNivCue == null && other.conCodigoNivCue != null) || (this.conCodigoNivCue != null && !this.conCodigoNivCue.equals(other.conCodigoNivCue))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.ConNivelCuenta[ conCodigoNivCue=" + conCodigoNivCue + " ]";
    }
    
}
